package com.lxl.rabbitmq1.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class EmailConsumer {

    //模拟多个消费者
    @RabbitListener(queues = "email_queue")
    public void show(String message) {
        System.out.println("客户1接收到的邮件消息：" + message);
    }

    @RabbitListener(queues = "email_queue")
    public void show2(String message) {
        System.out.println("客户2接收到的邮件消息：" + message);
    }
}